﻿<!-- 실종 전단 페이지 -->
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no"/>
<title>S-Pet Index Page(v0.3)</title>
<link rel="stylesheet" type="text/css" href="css/1128.css">
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.4.0-rc.1/jquery.mobile.structure-1.4.0-rc.1.min.css" /> 
<!--<link href="lib/jquery.mobile-1.3.2.css" type="text/css" rel="stylesheet">-->
    <script src="http://code.jquery.com/jquery-1.10.2.min.js"></script>
<script type="text/javascript">
//url string
var qString = fDecode(window.location.search.substring(1));
function fParam(VarSearch){
//	var SearchString = window.location.search.substring(1);
	var VariableArray = qString.split('&');
	for(var i = 0; i < VariableArray.length; i++){
		var KeyValuePair = VariableArray[i].split('=');
		if(KeyValuePair[0] == VarSearch){
			return KeyValuePair[1];
		}
	}
}
//url encoding
function fEncode(text) {
	return encodeURIComponent(text).replace(/'/g,"%27").replace(/"/g,"%22");	
}
function fDecode(text) {
	return decodeURIComponent(text.replace(/\+/g,  " "));
}


$(function(){
	$('#i').val(fParam('i'));
//$('span #n').html('<b>'+fParam('n')+'</b>(이)를 찾습니다!');
$('form #n').html(fParam('n'));
$('#o').text(fParam('o'));
$('#m').text(fParam('m'));
$('#t').val(fParam('t'));
$('#tel').attr('href','tel:'+fParam('t'));

});

alert('넘어온 string 확인 :'+qString);
</script>
</head>
<body>
	<div data-role="page">
		<div data-role="header" data-theme="b" data-position="fixed">
			<a href="/" data-icon="home" class="ui-btn-left">Home</a>
			<h1>실종전단</h1>
			<a href="#" data-icon="refresh">Refresh</a>	
		</div>
		
		<div data-role="content">
			<form method="POST" action="">
				<span class="title"><b id="n"></b>(이)를 찾습니다!</span><br/>
				<br/>
				우리<span class="content" id="n"></span>(은)는요...<br/>
				<font color="#00f"><span id="m"></span></font><br/>
				찾아주시면 후사하겠습니다!(<span id="c"></span>만원)<br/>
				<br/>
				&nbsp;&nbsp;&nbsp;&nbsp;-<span class="title" id="o"></span>드림<br/>
				<hr/>
				<input type="hidden" name="i"  id="i" value="<%= data.pid %>"/>
				<center><input type="button" value="SMS"/></center>
				<center>
					<a id="tel">
					<input type="button" id="t"/></a>
				</center>			
				<input type="button" value="기능 준비중..."/>
			</form>
			<hr/>
			<a href="/log/deltag?i=<%= data.pid %>">찾았습니다.(Not Yet)</a>
		</div>
	</div>
</body>
</html>